/*
 * Copyright (c) 2023 Huawei Technologies Co., Ltd.
 * openUBMC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#ifndef EMULEX_OM_H
#define EMULEX_OM_H

#include <mc/engine.h>

#include "interface/optical_module.h"
#include "interface/optical_module/cooling.h"
#include "interface/optical_module/status.h"
#include "interface/optical_module/voltage.h"
#include "interface/optical_module/power.h"
#include "interface/optical_module/current.h"

namespace dev {

class emulex_optical_module : public mc::engine::object<emulex_optical_module> {
public:
    MC_OBJECT(emulex_optical_module, "OpticalTransceiver", "OpticalTransceiver",
              (OpticalModule)(OpticalModule_Status)(OpticalModule_Cooling)(OpticalModule_Voltage)(OpticalModule_Power)(OpticalModule_Current))

    emulex_optical_module()  = default;
    ~emulex_optical_module() = default;

    bool start();
    bool stop();
    bool init(mc::mutable_dict& csr_object, const mc::dict& connector);

    OpticalModule         m_optical_module;
    OpticalModule_Status  m_optical_module_status;
    OpticalModule_Cooling m_optical_module_cooling;
    OpticalModule_Voltage m_optical_module_voltage;
    OpticalModule_Power   m_optical_module_power;
    OpticalModule_Current m_optical_module_current;

};

} // namespace dev

#endif
